﻿// Decompiled with JetBrains decompiler
// Type: Netick.Unity.UnityLogger
// Assembly: Netick.Unity, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E128C7FD-39ED-4452-86AC-6EC748457030
// Assembly location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.Unity.dll
// XML documentation location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.Unity.xml

using System;
using UnityEngine;

#nullable disable
namespace Netick.Unity;

internal class UnityLogger : INetickLogger
{
  public void Log(object message) => Debug.Log(message);

  public void LogWarning(object message) => Debug.LogWarning(message);

  public void LogError(object message) => Debug.LogError(message);

  public void LogException(object message, object targetScript)
  {
    if (targetScript is MonoBehaviour)
      Debug.LogException(message as Exception, (UnityEngine.Object) (targetScript as MonoBehaviour));
    else
      Debug.LogError(message);
  }
}
